<?php

class Validate_MaxLength extends Validate_Abstract {

  public function isValid($value) {
    $value = (string) $value;
    if (strlen($value) > $this->getParam('max-length')) {
      return false;
    }
    return true;
  }

  public function getMessage($value) {
    return "this field is require!";
  }

}